<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>隔行换色</title>
    <style>

        tbody tr:nth-child(odd){
            background-color: #FF0000;
        }
    </style>
</head>
<body>

<table>
    <thead>
    <th>
    <td>编号</td>
    <td>姓名</td>
    <td>年龄</td>
    </th>
    </thead>
    <tbody>
    <tr>
        <td>1</td>
        <td>M</td>
        <td>19</td>
    </tr>
    <tr>
        <td>2</td>
        <td>M</td>
        <td>19</td>
    </tr>
    <tr>
        <td>3</td>
        <td>M</td>
        <td>19</td>
    </tr>

    </tbody>
</table>

</body>
</html>